package dao

import (
	"time"
)

// 这是 SysDictionary 的全局公开dao对象
var SysDictionaryDao = sysDictionaryDao{}

// 这是 sys_dictionary表 的实体类
type SysDictionary struct {
	Id        int       `json:"id" form:"id" binding:"id"`
	CreatedAt time.Time `json:"created_at" form:"created_at" binding:"created_at"`
	UpdatedAt time.Time `json:"updated_at" form:"updated_at" binding:"updated_at"`
	DeletedAt time.Time `json:"deleted_at" form:"deleted_at" binding:"deleted_at"`
	Name      string    `json:"name" form:"name" binding:"name"`       // 字典名（中）
	Type      string    `json:"type" form:"type" binding:"type"`       // 字典名（英）
	Desc      string    `json:"desc" form:"desc" binding:"desc"`       // 描述
	Status    int       `json:"status" form:"status" binding:"status"` // 状态

}

// 注意:这是 SysDictionary 的私有dao对象
type sysDictionaryDao struct {
	Obj    SysDictionary
	Insert func(arg SysDictionary) int           //插入一条记录
	Update func(arg SysDictionary) int           //更新一条记录
	Delete func(arg SysDictionary) int           //删除一条记录
	Select func(arg SysDictionary) SysDictionary //获取一条记录
}
